const { get, post } = require('./http')
const { uploadfile } = require('../utils/upload')
const prefix = '/data/api.auth.matchclub'

// 获取赛事列表
export const getMatchList = (params) => { return post('/data/api.caliancematch/getmatchall', params) }
// 获取赛事信息
export const getMatchInfo = (params) => { return post(`${prefix}/matchextrainfo`, params) }
// 获取赛事详情
export const getMatchDetail = (params) => { return post(`/data/api.matchclub/matchinfo`, params) }
// 获取赛事详情--授权
export const getMatchDetailAuth = (params) => { return post(`/data/api.auth.matchclub/matchinfo`, params) }
// 获取分组信息
export const getMatchRound = (params) => { return post(`${prefix}/matchround`, params) }
// 获取赞助商轮播图
export const getCarousel  = (params) => { return get(`/data/api.auth.caliancematch/get_match_news`, params) }
// 获取视频
// export const getMatchVideo = (params) => { return post(`/api.news/getvideo`, params) }
// 报名支付
export const payMatch = (params) => { return post(`${prefix}/matchwxpay`, params) }
// 获取赛事新闻
export const getCollegeNews = (params) => { return get(`/data/api.news/get_news`, params) }
// 获取广告
export const getNewsLogo = (params) => { return get('/data/api.news/getlogonews', params) }
// 获取赛事/注册报名广告
export const getMatchLogoNews = (params) => { return get('/data/api.news/get_match_logonews', params) }
// 获取全部赛事新闻
export const searchSchoolNews = (params) => { return get('/data/api.news/search_school_news', params) }
// 获取团队成绩卡
export const getTeamScore = (params) => { return get('/data/api.caddie/teamscore', params) }
// 发布赛事
export const createMatch = (params) => { return post('/data/api.auth.matchclub/creatematch', params) }
//获取赛事相关的信息 如果是新建的话 加载基本信息 修改的话 加载所有赛事的信息 
export const getMatchBasicInfo = (params) => { return post('/data/api.auth.matchclub/getMatchInfo', params) }

//获取我报名的比赛信息
export const getPlayersign = (params) => { return post('/data/api.auth.matchclub/getPlayersign', params) }
//提交报名的比赛信息
export const playersign = (params) => { return post('/data/api.auth.matchclub/playersign', params) }
//改变报名的比赛状态
export const changeplayersignState = (params) => { return post('/data/api.auth.matchclub/changeplayersignState', params) }
//查询比赛球员奖项设置
export const getMatchPlayerawards = (params) => { return post('/data/api.auth.matchclub/getMatchPlayerawards', params) }
//设置比赛球员奖项设置
export const updatematchawards = (params) => { return post('/data/api.auth.matchclub/updatematchawards', params) }
//获取比赛的比赛分组信息
export const getMatchGroupManage = (params) => { return post('/data/api.auth.matchclub/getMatchGroupManage', params) }

//提交比赛分组信息
export const updatematchgroup = (params) => { return post('/data/api.auth.matchclub/updatematchgroup', params) }


// 获取电子参赛卡
export const getmembermatchcard = (params) => { return post('match/getmembermatchcard', params) }
//上传电子参赛卡的照片
export const uploadmatchcardpic = (params) => { return post('match/uploadmatchcardpic', params) }

//检查是否可以上传
export const checkmatchcardupload = (params) => { return post('match/checkmatchcardupload', params) }


//获取一场报名的比赛信息
export const getMatchPlayersign = (params) => { return post('/data/api.auth.matchclub/getMatchPlayersign', params) }
//获取我管理的赛事
export const getMymanageMatch = (params) => { return post('/data/api.auth.matchclub/getMymanageMatch', params) }

//删除比赛流程
export const deletematchschule = (params) => { return post('/data/api.auth.matchclub/deletematchschule', params) }

//查找比赛招商 
export const getmatchsponsor = (params) => { return post('/data/api.auth.matchclub/getmatchsponsor', params) }
//更新比赛招商 updatematchsponsor
export const updatematchsponsor = (params) => { return post('/data/api.auth.matchclub/updatematchsponsor', params) } 
//删除比赛招商 deletematchsponsor
export const deletematchsponsor = (params) => { return post('/data/api.auth.matchclub/deletematchsponsor', params) } 


/**** 竞猜相关 ***/
export const addGuess = (params) => { return post(`/data/api.auth.guess/addguess`, params) } // 提交竞猜
export const getMyGuess = (params) => { return post(`/data/api.auth.guess/myguessinfo`, params) } // 我的竞猜详情
export const getGuessResult = (params) => { return post(`/data/api.auth.guess/guessresult`, params) } // 竞猜结果


/*** 关联球员成绩 ***/ 
export const connectPlayer = (params) => { return post('/data/api.auth.matchclub/connectPlayer', params) }

/*** 点赞数量 ***/ 
export const getlikes = (params) => { return post('/data/api.auth.matchclub/getlikes', params) }

/*** 点赞操作 ***/ 
export const liked = (params) => { return post('/data/api.auth.matchclub/liked', params) }
/*** 点赞排名 ***/ 
export const getlikesrank = (params) => { return post('/data/api.auth.matchclub/getlikesrank', params) }

/*** 上传分组 ***/ 
export const uploadgroupexcel = (params) => { return uploadfile('/data/api.auth.matchclub/match_group_excel', params) }

/*** 获取比赛数据 ***/ 
export const getmatchdata = (params) => { return post('/data/api.auth.matchclub/getmatchdata', params) }

/*** 比赛浏览量 ***/ 
export const viewed = (params) => { return post('/data/api.auth.matchclub/viewed', params) }


